package 第六章面向对象;

public class OOTest03 {
    public static void main(String[] args) {
        User u = new User();
        Address a = new Address(); //等效于 u.addr=new Address();
        u.addr = a;
        System.out.println(u.addr.city);
        a.city = "nanjing";
        System.out.println(u.addr.city);
        System.out.println(a.city);
    }
}
